package com.iweb.newa202104.service.impl;

import com.iweb.newa202104.Mapper.CategoryMapper;
import com.iweb.newa202104.entity.CategoryEntity;
import com.iweb.newa202104.service.CategoryService;
import com.iweb.newa202104.util.CommonUtil;
import com.iweb.newa202104.vo.ResultVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * description:  <br>
 * date: 2021/5/11 21:28 <br>
 * author: ztz <br>
 * version: 1.0 <br>
 */
@Service
public class CategoryServiceImpl implements CategoryService {

    @Autowired
    CategoryMapper categoryMapper;

    @Override
    public ResultVO getAll() {
        CategoryEntity[] allCategory = categoryMapper.getAllCategory();
        return CommonUtil.ajaxReturn(allCategory);
    }
}
